package com.imooc.service.center;

import com.imooc.pojo.Orders;
import com.imooc.pojo.vo.OrderStatusCountsVO;
import com.imooc.utils.PagedGridResult;

/**
 * @ClassName: CenterUserService
 * @Package: com.imooc.service
 * @Description:
 * @Date: 2021/7/5 11:25
 * @Author: sunzheng@beiming.com
 */
public interface MyOrdersService {

  /**
   * 查询我的订单列表
   *
   * @param userId      用户id
   * @param OrderStatus 订单状态
   * @param page        页面
   * @param pageSize    页面大小
   * @return {@link PagedGridResult}
   */
  public PagedGridResult queryMyOrders(String userId, Integer OrderStatus, Integer page,
      Integer pageSize);

  /**
   * 更新交付订单状态 订单状态 -> 商家发货
   *
   * @param orderId 订单id
   */
  public void updateDeliverOrderStatus(String orderId);

  /**
   * 查询我的订单
   *
   * @param userId  用户id
   * @param orderId 订单id
   * @return {@link Orders}
   */
  public Orders queryMyOrder(String userId, String orderId);

  /**
   * 更新订单状态 -> 确认收货
   *
   * @param orderId 订单id
   * @return boolean
   */
  public boolean updateReceiveOrderStatus(String orderId);

  /**
   * 删除订单(逻辑删除)
   *
   * @param userId  用户id
   * @param orderId 订单id
   * @return boolean
   */
  public boolean deleteOrder(String userId, String orderId);

  /**
   * 查询用户订单数
   *
   * @param userId 用户id
   * @return int
   */
  public OrderStatusCountsVO
  getOrderStatusCounts(String userId);

  /**
   * 获得分页的订单动向
   *
   * @param userId   用户id
   * @param page     页面
   * @param pageSize 页面大小
   * @return {@link PagedGridResult}
   */
  public PagedGridResult getOrderTrend(String userId, Integer page, Integer pageSize);


}
